﻿using System.Collections.Generic;
using System.Linq;

namespace DocuGenerator.Model
{
	public class Method
	{
		public Method(
			string name, 
			DeclaringType returnType, 
			string summary = null,
			string example = null,
			IEnumerable<Arg> args = null)
		{
			Name = name;
			ReturnType = returnType;
			Summary = summary;
			Example = example;
			Args = (args ?? Enumerable.Empty<Arg>()).ToArray();
		}

		public string Name { get; private set; }
		public DeclaringType ReturnType { get; private set; }
		public string Summary { get; private set; }
		public string Example { get; private set; }
		public Arg[] Args { get; private set; }
	}
}